how to solve star pattern program in c